home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / begincpp.zip / #3_VER3.C < prev    next >
C/C++ Source or Header  |  1990-07-28  |  6KB  |  102 lines

  1. #line 1 "#3_ver3.cxx"
  2. void *_new(long);
  3. void _delete(void*);
  4. void *_vec_new(void*,int,int,void*(*)(void*));
  5. void _vec_delete(void*,int,int,void(*)(void*,int),...);
  6. void exit(int);
  7. static void cdecl _STI();
  8. static void cdecl _STD();
  9.  
  10.  
  11.  
  12.  
  13. struct Wsp { char _dummy; } ;
  14. extern char *oct (long , int );
  15. extern char *dec (long , int );
  16. extern char *hex (long , int );
  17.  
  18. extern char *chr (int , int );
  19. extern char *str (char *, int );
  20. extern char *form (char *, ... );
  21. struct ostream { 
  22. void *_ostream_bp ;
  23. short _ostream_state ;} ;
  24. struct ostream *_ostream__lshiftNFNPC__ (struct ostream* , char *);
  25. struct ostream *_ostream__lshiftNFUL__ (struct ostream* , unsigned long );
  26. struct ostream *_ostream__lshiftNFL__ (struct ostream* , long );
  27. struct ostream *_ostream__lshiftNFD__ (struct ostream* , double );
  28. struct ostream *_ostream__lshiftNFNRCWsp___ (struct ostream* , struct Wsp *);
  29. struct ostream *_ostream_put (struct ostream* , char );
  30. struct istream { 
  31. void *_istream_bp ;
  32. struct ostream *_istream_tied_to ;
  33. char _istream_skipws ;
  34. short _istream_state ;} ;
  35. struct istream *_istream__rshiftNFNPC__ (struct istream* , char *);
  36. struct istream *_istream__rshiftNFNRC__ (struct istream* , char *);
  37. struct istream *_istream__rshiftNFNRS__ (struct istream* , short *);
  38. struct istream *_istream__rshiftNFNRI__ (struct istream* , int *);
  39. struct istream *_istream__rshiftNFNRL__ (struct istream* , long *);
  40. struct istream *_istream__rshiftNFNRF__ (struct istream* , float *);
  41. struct istream *_istream__rshiftNFNRD__ (struct istream* , double *);
  42. struct istream *_istream__rshiftNFNRCWsp___ (struct istream* , struct Wsp *);
  43. struct istream *_istream_getNFNPC_I_I__ (struct istream* , char *, int , char );
  44. struct istream *_istream_putback (struct istream* , char );
  45. extern void eatwhite (struct istream *);
  46. extern struct istream cin ;
  47. extern struct ostream cout ;
  48. extern struct ostream cerr ;
  49.  
  50. extern struct Wsp WS ;
  51. struct complex { 
  52. double _complex_re ;double _complex_im ;} ;
  53. void pascal _complex__asplus (struct complex* , struct complex );
  54. extern int _eqNFCcomplex__Ccomplex___ (struct complex , struct complex );
  55. extern struct complex _mulNFCcomplex__Ccomplex___ (struct complex , struct complex );
  56. extern struct complex _plusNFCcomplex__Ccomplex___ (struct complex , struct complex );
  57. extern struct complex _plusNFCcomplex__Ccomplex___ (struct complex _au0_a , struct complex _au0_b ){ 
  58. struct complex _au0__V1 ;
  59. return ( ( ( ( ((& _au0__V1 )-> _complex_re = (_au0_a . _complex_re + _au0_b . _complex_re )), ((& _au0__V1 )-> _complex_im = (_au0_a . _complex_im + _au0_b . _complex_im ))) , (((& _au0__V1 )))) ) , _au0__V1 ) ;} } 
  60. extern struct complex _mulNFCcomplex__Ccomplex___ (struct complex _au0_a , struct complex _au0_b ){ 
  61.  
  62. struct complex _au0__V2 ;
  63. return ( ( ( ( ((& _au0__V2 )-> _complex_re = ((_au0_a . _complex_re * _au0_b . _complex_re )- (_au0_a . _complex_im * _au0_b . _complex_im ))), ((& _au0__V2 )-> _complex_im = ((_au0_a . _complex_re * _au0_b . _complex_im )+ (_au0_a . _complex_im * _au0_b . _complex_re )))) , (((& _au0__V2 )))) ) , _au0__V2 ) ;} } 
  64. extern int _eqNFCcomplex__Ccomplex___ (struct complex _au0_a , struct complex _au0_b ){ 
  65. return ((_au0_a . _complex_re == _au0_b . _complex_re )&& (_au0_a . _complex_im == _au0_b . _complex_im ));} 
  66. void pascal _complex__asplus (
  67. register struct complex *this , 
  68. struct complex _au0_a ){ 
  69. this -> _complex_re += _au0_a . _complex_re ;
  70. this -> _complex_im += _au0_a . _complex_im ;} 
  71. int main (){ { 
  72. struct complex _au1_num1 ;
  73. struct complex _au1_num2 ;
  74. struct complex _au1_num3 ;
  75. struct complex _au1_num4 ;
  76. struct complex _au1_num5 ;
  77. struct complex _au1_num6 ;
  78. struct complex _au1_num7 ;
  79. struct complex _au1_num8 ;
  80. double _au1_x ;double _au1_y ;double _au1_z ;
  81. ( ( ( (((struct complex *)(& _au1_num1 ))-> _complex_re = ((double )1 )), (((struct complex *)(& _au1_num1 ))-> _complex_im = ((double )0 ))) , ((((struct complex *)(& _au1_num1 ))))) ) ;
  82. ( ( ( ((& _au1_num2 )-> _complex_re = 1. ), ((& _au1_num2 )-> _complex_im = 1. )) , (((& _au1_num2 )))) ) ;
  83. ( ( ( ((& _au1_num3 )-> _complex_re = 3. ), ((& _au1_num3 )-> _complex_im = 8. )) , (((& _au1_num3 )))) ) ;
  84. ( ( ( ((& _au1_num4 )-> _complex_re = 1. ), ((& _au1_num4 )-> _complex_im = 1. )) , (((& _au1_num4 )))) ) ;
  85. ( ( ( ((& _au1_num5 )-> _complex_re = ((double )( 5 ) )), ((& _au1_num5 )-> _complex_im = 1. )) , (((& _au1_num5 )))) ) ;
  86. ( ( ( ((& _au1_num6 )-> _complex_re = ((double )( ( ( ( 6 ) , 7 ) , 8 ) , 9 ) )), ((& _au1_num6 )-> _complex_im = 1. )) , (((& _au1_num6 )))) ) ;
  87. ( ( ( ((& _au1_num7 )-> _complex_re = ((double )5 )), ((& _au1_num7 )-> _complex_im = ((double )5 ))) , (((& _au1_num7 )))) ) ;
  88. _au1_num8 = ( _au1_num1 ) ;
  89. _au1_x = 1. ;_au1_y = 5. ;_au1_z = 3. ;
  90.  
  91. struct complex _au0__V3 ;struct complex _au0__V4 ;
  92. _complex__asplus ( & _au1_num4 , _plusNFCcomplex__Ccomplex___ ( _plusNFCcomplex__Ccomplex___ ( _eqNFCcomplex__Ccomplex___ ( _au1_num1 , _au1_num2 ) ? _au1_num3 : _au1_num1 , ( ( ( ( ((& _au0__V3 )-> _complex_re = (_au1_x * _au1_y )), ((& _au0__V3 )-> _complex_im = 1. )) , (((& _au0__V3 )))) ) , _au0__V3 ) ) , ( ( ( ( ((& _au0__V4 )-> _complex_re = (1. / _au1_z )), ((& _au0__V4 )-> _complex_im = 1. )) , (((& _au0__V4 )))) ) , _au0__V4 ) ) ) ;
  93.  
  94. ( _ostream__lshiftNFNPC__ ( & cout , (char *)form ( (char *)"(%5.3f, %5.3f)\n", (& _au1_num4 )-> _complex_re , (& _au1_num4 )-> _complex_im ) ) ) ;
  95. ( _ostream__lshiftNFNPC__ ( & cout , (char *)form ( (char *)"(%5.3f, %5.3f)\n", (& _au1_num5 )-> _complex_re , (& _au1_num5 )-> _complex_im ) ) ) ;
  96. ( _ostream__lshiftNFNPC__ ( & cout , (char *)form ( (char *)"(%5.3f, %5.3f)\n", (& _au1_num6 )-> _complex_re , (& _au1_num6 )-> _complex_im ) ) ) ;
  97. ( _ostream__lshiftNFNPC__ ( & cout , (char *)form ( (char *)"(%5.3f, %5.3f)\n", (& _au1_num7 )-> _complex_re , (& _au1_num7 )-> _complex_im ) ) ) ;
  98. ( _ostream__lshiftNFNPC__ ( & cout , (char *)form ( (char *)"(%5.3f, %5.3f)\n", (& _au1_num8 )-> _complex_re , (& _au1_num8 )-> _complex_im ) ) ) ;} }  exit ( 0 ); }
  99.